\doxysection{bsp\+\_\+dwt.\+h}
\hypertarget{bsp__dwt_8h_source}{}\label{bsp__dwt_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/bsp/dwt/bsp\_dwt.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/bsp/dwt/bsp\_dwt.h}}
\mbox{\hyperlink{bsp__dwt_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#ifndef\ \_BSP\_DWT\_H}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#define\ \_BSP\_DWT\_H}}
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{main_8h}{main.h}}"{}}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ "{}stdint.h"{}}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ "{}bsp\_log.h"{}}}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{00022\ \{}
\DoxyCodeLine{00023\ \ \ \ \ uint32\_t\ s;}
\DoxyCodeLine{00024\ \ \ \ \ uint16\_t\ ms;}
\DoxyCodeLine{00025\ \ \ \ \ uint16\_t\ us;}
\DoxyCodeLine{00026\ \}\ \mbox{\hyperlink{struct_d_w_t___time__t}{DWT\_Time\_t}};}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#define\ TIME\_ELAPSE(dt,\ code)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\ \ \ \ do\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ float\ tstart\ =\ DWT\_GetTimeline\_s();\ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00037\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ code;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ dt\ =\ DWT\_GetTimeline\_s()\ -\/\ tstart;\ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ LOGINFO("{}[DWT]\ "{}\ \#dt\ "{}\ =\ \%f\ s\(\backslash\)r\(\backslash\)n"{},\ dt);\ \(\backslash\)}}
\DoxyCodeLine{00040\ \textcolor{preprocessor}{\ \ \ \ \}\ while\ (0)}}
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00047\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{bsp__dwt_8h_a80bda377ca5cef73b03e7211b1fa18b9}{DWT\_Init}}(uint32\_t\ CPU\_Freq\_mHz);}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00055\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{bsp__dwt_8h_af3972f1a5023286afdabf8e79abc5ed7}{DWT\_GetDeltaT}}(uint32\_t\ *cnt\_last);}
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00063\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{bsp__dwt_8h_ae3519a5f8a00524b8ced263a18fbc37e}{DWT\_GetDeltaT64}}(uint32\_t\ *cnt\_last);}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00070\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{bsp__dwt_8h_ab100be84fd91e5f606bd34b2cd62ecef}{DWT\_GetTimeline\_s}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00077\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{bsp__dwt_8h_aff20f0eb6b9b6e4df5c8e509b0ca06dd}{DWT\_GetTimeline\_ms}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00084\ uint64\_t\ \mbox{\hyperlink{bsp__dwt_8h_abf89a827c23ac1dcbb5639369d658081}{DWT\_GetTimeline\_us}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00093\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{bsp__dwt_8h_a88912548ae8934bfc08e9c340974cab9}{DWT\_Delay}}(\textcolor{keywordtype}{float}\ Delay);}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00099\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{bsp__dwt_8h_a0f591d032752c63e190dc3d55ea959c7}{DWT\_SysTimeUpdate}}(\textcolor{keywordtype}{void});}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ BSP\_DWT\_H\_\ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
